package model.Settings;

import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Configuration class for the board.
 * 
 * @author Peter-John
 *
 */
public class BoardConfigurations extends Configurations {

	/** 
	 * Constructor 
	 * 
	 * @throws FileNotFoundException
	 * @throws IOException
	 */
	public BoardConfigurations() throws FileNotFoundException, IOException{
		loadConfiguration(Configurations.BOARD_CONFIGURATIONS_FILENAME);
	}
	
	/**
	 * Gets the size of the board from the configuration
	 * 
	 * @return nBoardSize - the size of he board
	 */
	public int getBoardSize() {
		int nBoardSize = Integer.parseInt(getConfigurationValue(Configurations.BOARD_SIZE_CONFIGURATION));
		return nBoardSize;
	}
	
	public void setBoardSize(int a_nBoardSize) {
		String sBoardSize = Integer.toString(a_nBoardSize);
		setConfigurationValue(Configurations.BOARD_SIZE_CONFIGURATION,sBoardSize);
	}
	
} // BoardConfiguration Class
